package com.sinog.alarm.mapper.db2;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sinog.alarm.model.SystemUser;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;

/**
 * @desc SystemUserMapper
 * @author gk-wangxj
 * @date -
 */
@DS("db2")
public interface SystemUserMapper extends BaseMapper<SystemUser> {

    /**
     * 查询tbsys_user表
     * @param map map
     * @return SystemUser
     */
    SystemUser selectUserByParam(@Param("map") Map<String,String> map);

    /**
     * 根据departId删除用户信息
     * @param departId departId
     */
    void deleteAccountByDepartId(String departId);

    /**
     * 新增tbsys_user
     * @param systemUser systemUser
     */
    void insertStstemUser(SystemUser systemUser);

    /**
     * 更改用户上级单位
     * @param systemUser systemUser
     * @param paramMap paramMap
     */
    void updateSystemUser(@Param("systemUser") SystemUser systemUser,@Param("paramMap")Map<String,String> paramMap);

    /**
     * 根据department查找用户信息
     * @param departid departid
     * @param orgid orgid
     * @return List<Map<String,Object>>
     */
    List<Map<String,Object>> selectSystemUserByDepartmentId(@Param("departid") String departid,@Param("orgid") String orgid);
}